package com.smily.string;

/**
 * Created by Smily on 10/23/15.
 */
public class Contains {
    public static void main(String[] args){
        String s1 = null;
        String s2 = "";
        if(s2.contains(s1)){
            System.out.println("s2包含了s1");
            //删掉s1
            s2 = s2.replace(s2.substring(s2.indexOf(s1), s2.length()), "");
            System.out.println(s2);
        }else{
            System.out.println("s2不包含s1");
        }
    }
}
